<template>
  <div style="width:180px;">
      <div class="wrap" style="width: 100%;
    position: relative;">
          <div class="left-bar" style="width: 2px;
    height: 54px;
    background-color: #00704E;
    position: absolute;"></div>
          <div class="title" style="color: #fff;
    margin-left: 10px;
    margin-bottom: 2px;
    font-size: 14px;">未来七天天气预报</div>
          <div class="item" v-for="item in weatherlist" :key="item.id" style="width: calc(100%-10px);
    margin-left: 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-size: 12px;
    color: #fff;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);">
              <div class="top" style="display: flex;
    justify-content: space-between;
    padding-top: 4px;">
                  <div class="top-left" style="flex:1.7;
    display: flex;
    justify-content: space-between;
    align-items: center;">
                      <div style="display: flex;
    align-items: center;">{{item.day}}</div>
                      <div style="display: flex;
    align-items: center;">
                          <img :src="item.icon" alt="" style="width: 17px;">
                          &nbsp;{{item.temperature}}℃ {{item.weather}}
                      </div>
                  </div>
                  <div class="humidity" style="flex:1.1;
    display: flex;
    justify-content: flex-end;
    align-items: center;">湿度 {{item.humidity}}%</div>
              </div>
              <div class="btm" style="display: flex;
    justify-content: space-between;
    padding-top: 4px;
    padding-bottom: 4px;">
                  <div class="btm-left" style="flex:2;
    display: flex;
    justify-content: space-between;
    align-items: center;">
                      <div class="date" style="display: flex;
    align-items: center;">{{item.date}}</div>
                      <div class="wind" style="display: flex;
    align-items: center;">{{item.wind}}</div>
                  </div>
                  <div class="air" style="flex:1.3;
    display: flex;
    justify-content: flex-end;
    align-items: center;"><span style="background-color: #00704E;
    width: 50px;
    height: 20px;
    padding: 2px 0;
    border-radius: 12px;
    text-align: center;
    line-height: 20px;
    display: inline-block;">{{item.air}}</span></div>
              </div>
          </div>
      </div>
  </div>
</template>

<script>
export default {
    data() {
        return {
            weatherlist: [
                {
                    day: '明天',
                    icon: require('../assets/天气/晴.png'),
                    temperature: '34',
                    weather: '晴',
                    humidity: '10',
                    date: '9月10日',
                    wind: '北风2-3级',
                    air: '45优'
                },
                {
                    day: '后天',
                    icon: require('../assets/天气/阴.png'),
                    temperature: '29',
                    weather: '阴',
                    humidity: '10',
                    date: '9月11日',
                    wind: '北风2-3级',
                    air: '45优'
                },
                {
                    day: '周六',
                    icon: require('../assets/天气/小雨.png'),
                    temperature: '34',
                    weather: '雨',
                    humidity: '10',
                    date: '9月12日',
                    wind: '北风2-3级',
                    air: '45优'
                },
                {
                    day: '周日',
                    icon: require('../assets/天气/小雪.png'),
                    temperature: '11',
                    weather: '雪',
                    humidity: '5',
                    date: '9月13日',
                    wind: '北风4-6级',
                    air: '20优'
                },
            ]
        }
    },
}
</script>

<style>
/* .wrap{
    width: 100%;
    position: relative;
}
.left-bar{
    width: 2px;
    height: 70px;
    background-color: #00704E;
    position: absolute;
}
.title{
    color: #fff;
    margin-left: 10px;
    margin-bottom: 10px;
    font-size: 14px;
}
.item img{
    width: 25px;
}
.item{
    width: 100%;
    margin-left: 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-size: 12px;
    color: #fff;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
}
.top,.btm{
    display: flex;
    justify-content: space-between;
    padding-top: 4px;
    padding-bottom: 4px;
}
.top{
    padding-bottom: 0;
}
.top-left,
.btm-left{
    flex:2;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.top-left div,
.btm-left div{
    display: flex;
    align-items: center;
}
.humidity,.air{
    flex:1.3;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}
.air span{
    background-color: #00704E;
    width: 50px;
    height: 20px;
    padding: 2px 0;
    border-radius: 12px;
    text-align: center;
    line-height: 20px;
    display: inline-block;
} */
</style>